all:  pp sl sort

run:
	mpirun -np 4 sl
pp: 
	mpicxx -o pp pp.cpp -lmpich
	rm -f *.o
sl:
	mpicxx -I${TACC_PAPI_INC} -c sl.cpp 
	mpicxx -Wl,-rpath,${TACC_PAPI_LIB} -L${TACC_PAPI_LIB} -lpapi -lmpich sl.o -o sl
	rm -f *.o
sort: sort.cpp
	mpicxx -I${TACC_PAPI_INC} -c sort.cpp 
	mpicxx -Wl,-rpath,${TACC_PAPI_LIB} -L${TACC_PAPI_LIB} -lpapi -lmpich sort.o -o sort
	rm -f *.o
#	mpicxx -c sort.cpp 
#	mpicxx -lmpich sort.o -o sort
#	rm -f *.o


clean:
	rm -f *.o pp sl sort
